package domain;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Embeddable;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;
import org.hibernate.validator.constraints.SafeHtml;
import org.hibernate.validator.constraints.SafeHtml.WhiteListType;
@Embeddable
@Access(AccessType.PROPERTY)
public class Assessment {

	// Constructor----------------------------------------------------------------------
	public Assessment() {
		super();
	}

	// Attributes-------------------------------------------------------------------------
	private int rating;
	private String text;
	
	
	@Range(min = 0, max = 100)
	public int getRating() {
		return rating;
	}

	public void setRating(int rating) {
		this.rating = rating;
	}
	
	@NotBlank
	@SafeHtml(whitelistType = WhiteListType.NONE)
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}


}
